/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator 石立立
 */
public class FaxSalary {
    public double getSalaryAfterFax(double rawSalary){
     //原始工资-2000；
     //纳税部分工资处于哪一档
     //原始工资-纳税部分  
      double salary =rawSalary - 2000;
      double fax =0;
      if(salary>=100000){
          fax =salary*0.45-15375;
      }else if(salary >=80000){
           fax =salary*0.4-10375;
      } else if(salary >=60000){
           fax =salary*0.35-6375;
      } else if(salary >=40000){
           fax =salary*0.3-3375;
      } else if(salary >=20000){
           fax =salary*0.25-1375;
      } else if(salary >=5000){
           fax =salary*0.2-375;
      } 
      else if(salary >=2000){
           fax =salary*0.15-125;
      } 
      else if(salary >=500){
           fax =salary*0.1-25;
      } 
    return rawSalary - fax;}
    public static void main(String[] args) {
        double raw=9000;
        System.out.println(raw+"工资对应的税后工资是"=getSalaryAfterFax(raw));
    }
}
